﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;


[CustomEditor(typeof(AreaPanelView))]
public class EditorAreaView : Editor
{
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        AreaPanelView panelItem = (AreaPanelView) target;


        if (GUILayout.Button("初始化"))
        {
            panelItem.Initialized();
            panelItem.UpdateInfo();
        }
        
        //点击创建的
        if (GUILayout.Button("添加"))
        {
            panelItem.AddPanelView();
            Debug.Log("添加成功");
        }


        if (GUILayout.Button("删除"))
        {
            panelItem.Delete();
        }
    }
}
